package com.feshfans.control;

import javafx.scene.control.Label;
import org.jxmpp.jid.BareJid;

import java.util.Objects;

public class RosterLabel extends Label {

    private BareJid jid;


    public BareJid getJid() {
        return jid;
    }

    public void setJid(BareJid jid) {
        this.jid = jid;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        RosterLabel that = (RosterLabel) o;
        return Objects.equals(jid.toString(), that.jid.toString());
    }

    @Override
    public int hashCode() {
        return Objects.hash(jid.toString());
    }
}
